﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MeasureAbstract.Base
{
    public interface IMeasureBase
    {
        /// <summary>
        /// 测量名称
        /// </summary>
        public string MeasureName { get; }

        /// <summary>
        /// 测量描述
        /// </summary>
        public string Description { get; }

        /// <summary>
        /// 测量进度
        /// </summary>
        public double Process { get; set; }

        ///// <summary>
        ///// 测量所用到的设备的列表
        ///// </summary>
        public ObservableCollection<IDeviceBase> DeviceList { get; set; }

        /// <summary>
        /// 测量初始化
        /// </summary>
        public Task MeasureInitialize(object obj);

        /// <summary>
        /// 测量开始
        /// </summary>
        public Task MeasureStart(object Type);

        /// <summary>
        /// 测量暂停
        /// </summary>
        public void MeasurePause();

        /// <summary>
        /// 测量继续
        /// </summary>
        public void MeasureContinue();

        /// <summary>
        /// 测量停止
        /// </summary>
        public void MeasureStop();

        /// <summary>
        /// 测量重置
        /// </summary>
        public void MeasureReset();

        /// <summary>
        /// 保存数据
        /// </summary>
        public void SaveData(object obj);
    }

    public sealed class DeviceInformation
    {
        /// <summary>
        /// 设备名称
        /// </summary>
        public string? Name { get; set; }

        /// <summary>
        /// 厂家
        /// </summary>
        public string? vender { get; set; }
        /// <summary>
        /// 设备型号
        /// </summary>
        public string? Model { get; set; }

        /// <summary>
        /// 设备编号（用于一个测量系统中区分同种型号的设备）
        /// </summary>
        public int ID { get; set; }

        /// <summary>
        /// 设备类型
        /// </summary>
        public Type? Type { get; set; }

        /// <summary>
        /// 设备对象
        /// </summary>
        public object? Object { get; set; }
    }

}
